<ion-view view-title="疯狂团购">
	<ion-content scroll="false">
		
		<!--轮播图-->
		<ion-slide-box does-continue="true" auto-play="true" delegate-handle="advs-handle" id="advsBox">
			<ion-slide ng-repeat="img in banners">
				<img src="{{img.image_id}}" width="100%" >
			</ion-slide>
		</ion-slide-box>
		
		<div class="row top">
			<div class="col" on-tap="activeSlide(0)" ng-class="selectIndex==0?'top-activated':''">
				进行中
			</div>
			<div class="col" on-tap="activeSlide(1)" ng-class="selectIndex==1?'top-activated':''">
				即将开始
			</div>
			<div class="col" on-tap="activeSlide(2)" ng-class="selectIndex==2?'top-activated':''">
				已经结束
			</div>
			<div class="col" on-tap="activeSlide(3)" ng-class="selectIndex==3?'top-activated':''">
				全部活动
			</div>
		</div>
		
		<ion-slide-box delegate-handle="tab-handle" on-touch="onTouch()" on-release="onRelease()" draw-slide="false" on-slide-changed="slideChanged(index)" active-slide="slideIndex" show-pager="false" >
		
		<ion-slide>
			<ion-scroll direction="y" ng-style="myObj" lazy-scroll>
				<!--描述：下拉刷新-->
				<ion-refresher pulling-text="下拉刷新..." on-refresh="doRefresh()"></ion-refresher>
				
				<div class="font-large-my font-gray-my text-center padding" ng-if="doing.act.length==0||doing.act==null">
					<i class="icon ion-sad-outline font-1rem-my"></i>
					对不起，没有进行中的团购活动.....
				</div>
				<div class="list">
					<div class="item item-thumbnail-left" ng-repeat="act in doing.act" style="padding-bottom: 8px;">
						<img src="{{act.image[0].image}}" ng-if="act.image[0].image" on-tap="onshow_detail(act.act_id,act.act_status)"/>
						<img src="{{noImg}}" ng-if="act.image[0].image==''||act.image[0].image==null" on-tap="onshow_detail(act.act_id,act.act_status)"/>
						<p class="font-middle-my" on-tap="go_store(act.store_id)"><i class="icon ion-home font-large-my font-gray-my" ></i>&nbsp;<span class="positive">{{act.store_name}}</span></p>
						<div on-tap="onshow_detail(act.act_id,act.act_status)">
							<p>{{act.act_name}}</p>
							<p class="font-gray-my font-middle-my">{{act.introduction}}</p>
							<p class="font-middle-my"><i class="icon ion-ios-timer-outline font-large-my"></i>&nbsp;<span class="assertive">{{act.formate_time}}</span></p>
						</div>
					</div>
				</div>
				<!--描述：当用户到达页脚或页脚附近时-->
				<ion-infinite-scroll ng-if="!isLoad" immediate-check="false" on-infinite="doRefreshMore()" distance="1%"></ion-infinite-scroll>
			</ion-scroll>
		</ion-slide>
		
		<ion-slide>
			<ion-scroll direction="y" ng-style="myObj" lazy-scroll>
				<!--描述：下拉刷新-->
				<ion-refresher pulling-text="下拉刷新..." on-refresh="doRefresh()"></ion-refresher>
				
				<div class="font-large-my font-gray-my text-center padding" ng-if="will.act.length==0||will.act==null">
					<i class="icon ion-sad-outline font-1rem-my"></i>
					对不起，没有即将开始的团购活动.....
				</div>
				<div class="list">
					<div class="item item-thumbnail-left" ng-repeat="act in will.act" style="padding-bottom: 8px;">
						<img src="{{act.image[0].image}}" ng-if="act.image[0].image" on-tap="onshow_detail(act.act_id,act.act_status)"/>
						<img src="{{noImg}}" ng-if="act.image[0].image==''||act.image[0].image==null" on-tap="onshow_detail(act.act_id,act.act_status)"/>
						<p class="font-middle-my" on-tap="go_store(act.store_id)"><i class="icon ion-home font-large-my font-gray-my" ></i>&nbsp;<span class="positive">{{act.store_name}}</span></p>
						<div on-tap="onshow_detail(act.act_id,act.act_status)">
							<p>{{act.act_name}}</p>
							<p class="font-gray-my font-middle-my">{{act.introduction}}</p>
							<p class="font-middle-my"><i class="icon ion-ios-timer-outline font-large-my"></i>&nbsp;<span class="assertive">{{act.formate_time}}</span></p>
						</div>
					</div>
				</div>
				<!--描述：当用户到达页脚或页脚附近时-->
				<ion-infinite-scroll ng-if="!isLoad" immediate-check="false" on-infinite="doRefreshMore()" distance="1%"></ion-infinite-scroll>
			</ion-scroll>
		</ion-slide>
		
		<ion-slide>
			<ion-scroll direction="y" ng-style="myObj" lazy-scroll>
				<!--描述：下拉刷新-->
				<ion-refresher pulling-text="下拉刷新..." on-refresh="doRefresh()"></ion-refresher>
				
				<div class="font-large-my font-gray-my text-center padding" ng-if="ended.act.length==0||ended.act==null">
					<i class="icon ion-sad-outline font-1rem-my"></i>
					对不起，没有已经结束的团购活动.....
				</div>
				<div class="list">
					<div class="item item-thumbnail-left" ng-repeat="act in ended.act" style="padding-bottom: 8px;">
						<img src="{{act.image[0].image}}" ng-if="act.image[0].image" on-tap="onshow_detail(act.act_id,act.act_status)"/>
						<img src="{{noImg}}" ng-if="act.image[0].image==''||act.image[0].image==null" on-tap="onshow_detail(act.act_id,act.act_status)"/>
						<p class="font-middle-my" on-tap="go_store(act.store_id)"><i class="icon ion-home font-large-my font-gray-my" ></i>&nbsp;<span class="positive">{{act.store_name}}</span></p>
						<div on-tap="onshow_detail(act.act_id,act.act_status)">
							<p>{{act.act_name}}</p>
							<p class="font-gray-my font-middle-my">{{act.introduction}}</p>
							<p class="font-middle-my"><i class="icon ion-ios-timer-outline font-large-my"></i>&nbsp;<span class="assertive">{{act.formate_time}}</span></p>
						</div>
					</div>
				</div>
				<!--描述：当用户到达页脚或页脚附近时-->
				<ion-infinite-scroll ng-if="!isLoad" immediate-check="false" on-infinite="doRefreshMore()" distance="1%"></ion-infinite-scroll>
			</ion-scroll>
		</ion-slide>
		
		<ion-slide>
			<ion-scroll direction="y" ng-style="myObj" lazy-scroll>
				<!--描述：下拉刷新-->
				<ion-refresher pulling-text="下拉刷新..." on-refresh="doRefresh()"></ion-refresher>
				
				<div class="font-large-my font-gray-my text-center padding" ng-if="datas.act.length==0||datas.act==null">
					<i class="icon ion-sad-outline font-1rem-my"></i>
					对不起，目前还没有团购活动.....
				</div>
				<div class="list">
					<div class="item item-thumbnail-left" ng-repeat="act in datas.act" style="padding-bottom: 8px;">
						<img src="{{act.image[0].image}}" ng-if="act.image[0].image" on-tap="onshow_detail(act.act_id,act.act_status)"/>
						<img src="{{noImg}}" ng-if="act.image[0].image==''||act.image[0].image==null" on-tap="onshow_detail(act.act_id,act.act_status)"/>
						<p class="font-middle-my" on-tap="go_store(act.store_id)"><i class="icon ion-home font-large-my font-gray-my" ></i>&nbsp;<span class="positive">{{act.store_name}}</span></p>
						<div on-tap="onshow_detail(act.act_id,act.act_status)">
							<p>{{act.act_name}}</p>
							<p class="font-gray-my font-middle-my">{{act.introduction}}</p>
							<p class="font-middle-my"><i class="icon ion-ios-timer-outline font-large-my"></i>&nbsp;<span class="assertive">{{act.formate_time}}</span></p>
						</div>
					</div>
				</div>
				<!--描述：当用户到达页脚或页脚附近时-->
				<ion-infinite-scroll ng-if="!isLoad" immediate-check="false" on-infinite="doRefreshMore()" distance="1%"></ion-infinite-scroll>
			</ion-scroll>
		</ion-slide>
		</ion-slide-box>
	</ion-content>
</ion-view>